<template>
  <div class="archive-search-page">
    <!-- 页面标题 -->
    <div class="page-header">
      <h1>智能检索</h1>
      <p>快速查找所需档案</p>
    </div>

    <!-- 搜索档案 -->
    <div class="search-section">
      <div class="section-header">
        <h3><i class="el-icon-search"></i> 搜索档案</h3>
      </div>
      
      <div class="search-form">
        <div class="search-input">
          <el-input
            v-model="searchQuery"
            placeholder="输入关键词、档案号或描述..."
            size="large"
            clearable
          >
            <el-button slot="append" type="primary" icon="el-icon-search" @click="handleSearch">搜索</el-button>
          </el-input>
        </div>
        
        <div class="search-actions">
          <el-button type="primary" @click="handleSearch">搜索</el-button>
          <el-button type="info" @click="handleVoiceSearch">语音</el-button>
        </div>
        
        <div class="search-suggestions">
          <span class="suggestion-label">常用搜索:</span>
          <el-button type="text" size="small" @click="quickSearch('财务档案')">财务档案</el-button>
          <el-button type="text" size="small" @click="quickSearch('人事档案')">人事档案</el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'ArchiveSearch',
  data() {
    return {
      searchQuery: ''
    }
  },
  methods: {
    handleSearch() {
      console.log('搜索:', this.searchQuery)
    },
    handleVoiceSearch() {
      console.log('语音搜索')
    },
    quickSearch(keyword) {
      this.searchQuery = keyword
      this.handleSearch()
    }
  }
}
</script>

<style scoped>
.archive-search-page {
  padding: 0;
}

.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px;
  margin-bottom: 30px;
  border-radius: 8px;
}

.page-header h1 {
  font-size: 28px;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.page-header p {
  font-size: 16px;
  margin: 0;
  opacity: 0.9;
}

.search-section {
  background: white;
  border-radius: 8px;
  padding: 30px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-header {
  margin-bottom: 30px;
}

.section-header h3 {
  font-size: 16px;
  margin: 0;
  color: #333;
  display: flex;
  align-items: center;
}

.section-header h3 i {
  margin-right: 8px;
  color: #4facfe;
}

.search-form {
  max-width: 800px;
  margin: 0 auto;
}

.search-input {
  margin-bottom: 20px;
}

.search-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.search-suggestions {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.suggestion-label {
  color: #666;
  font-size: 14px;
  margin-right: 12px;
}

.el-input--large .el-input__inner {
  height: 50px;
  font-size: 16px;
}

.el-input-group__append .el-button {
  height: 50px;
  padding: 0 20px;
}
</style> 